//
//  APLoginManager.h
//  AqualPolo
//
//  Created by dong on 2024/5/2.
//

#import <Foundation/Foundation.h>
#import "APUserModel.h"
#import "BaseDataManager.h"
#import "APImageModel.h"
static NSString * _Nonnull const  LoginSuccessNotification = @"LoginSuccessNotification";
static NSString * _Nonnull const  LoginFailNotification = @"LoginFailNotification";

NS_ASSUME_NONNULL_BEGIN
typedef void(^APLoginUserInfoUpdateResultBlock)(bool success,NSString *msg);
@interface APLoginManager : BaseDataManager
+ (APLoginManager *)shareInstance;

- (void)loginWithToken:(NSString *)token oauthType:(NSInteger)oauthType;
- (APUserModel *)userInfo;
- (NSString *)token;
- (BOOL)isLogin;
- (void)updateUserInfo:(NSDictionary *)userInfo;
- (void)updateAvatarInfo:(APImageModel *)model;
-(void)updateUserInfoByInternetSevice:(APLoginUserInfoUpdateResultBlock)callBack;
- (void)logout;
@end

NS_ASSUME_NONNULL_END
